var login = {
    template: ' <div>\n' +
        '        <div>用户名:<input v-model="user.username"/></div>\n' +
        '        <div>密码:<input v-model="user.password"/></div>\n' +
        '        <div><button @click="btnLoginClick">登录</button></div>\n' +
        '    </div>',
    data: function () {
        return {
            user: {
                username: '',
                password: '',
            }
        }
    }, methods: {
        btnLoginClick: function () {
            // this.$emit('user1', this.user);
            eventBus.$emit('user', this.user);
        }
    }
}
